<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>pprompt.js - simple modal dialog library</title>
<script type="text/javascript" src="pprompt.js"></script>
<style type="text/css">
* {
  font-family: "Trebuchet MS", Verdan, Osaka;
}

.examples li {
  cursor:pointer;
  text-decoration:underline;
}

pre {
  padding: 6px;
  border: 1px solid #ccc;
  background: #eee;
  overflow: scroll;
}

#footer {
  text-align: center;
}
</style>
</head>

<body>
<h1>PPrompt.js</h1>
<p>pprompt.js is simple modal dialog library. This library doesn't need any other libraries.</p>

<h2>Examples</h2>
<ul class="examples">
  <li id="simple_alert">Alert</li>
  <li id="simple_confirm">Confirm</li>
  <li id="simple_prompt">Prompt</li>
  <li id="getting_input">Getting input value</li>
</ul>
<pre><code>// simple alert
document.getElementById('simple_alert').onclick = function() {
  PPrompt.alert('This is simple alert');
}

// simple confirm
document.getElementById('simple_confirm').onclick = function() {
  PPrompt.confirm('This is simple confirm');
}

// simple prompt
document.getElementById('simple_prompt').onclick = function() {
  PPrompt.prompt('This is simple prompt');
}

// getting input value
document.getElementById('getting_input').onclick = function() {
  PPrompt.prompt('This is simple prompt', {
    onOk: function(val) {
      alert(val);
      PPrompt.close();
    }
  });
}</code></pre>

<h2>Download</h2>
<p><a href="pprompt.js">pprompt.js v0.4</a></p>

<h2>ChangeLog</h2>
<ul>
  <li>
    v0.4 --- set focus. added parameter at onOk function.<br />
    (via <a href="http://d.hatena.ne.jp/spiritloose/20061205/1165310837">http://d.hatena.ne.jp/spiritloose/20061205/1165310837</a>)
  </li>
</ul>

<h2>Repository</h2>
<pre><code>svn co http://pprompt.googlecode.com/svn/trunk/ pprompt</code></pre>

<div id="footer">created by <a href="http://p0t.jp/mt/">komagata</a></div>
<script type="text/javascript">
// simple alert
document.getElementById('simple_alert').onclick = function() {
  PPrompt.alert('This is simple alert');
}

// simple confirm
document.getElementById('simple_confirm').onclick = function() {
  PPrompt.confirm('This is simple confirm');
}

// simple prompt
document.getElementById('simple_prompt').onclick = function() {
  PPrompt.prompt('This is simple prompt');
}

// getting input value
document.getElementById('getting_input').onclick = function() {
  PPrompt.prompt('This is simple prompt', {
    onOk: function(val) {
      alert(val);
      PPrompt.close();
    }
  });
}
</script>
</body>
</html>
